package lambdaExamples.demo01;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

public class Main {

    public static void main(String[] args) {
        Message sms = (name, title) -> {
            System.out.println("This is an sms to " + title + " " + name);
            return "success!";
        };
        sendMessage(sms);
    }

    static void sendMessage(Message message) {
        String status = message.send("Robot", "Mr");
        System.out.println(status);
    }

}
